_ = require 'underscore'
MongooseClient = require '../../../models/mongoose_client'
AppConfig = require '../config'
MongooseConnection = MongooseClient.getMongooseConnection AppConfig.mongo

schemaInfoList =
  Commodity : 'commodity'

initModel = (schemaInfoList) ->
  _.each schemaInfoList, (value, key) ->
    module.exports[key] = MongooseConnection.model key, require "./schema/#{value}"

initModel schemaInfoList
